#include "Element.h"

Element::Element(int hashcode, int tokenTyp, char* lexem, int lexemLength) {
	this->hashcode = hashcode;
	this->tokenTyp = tokenTyp;
	this->lexem = lexem;
	this->lexemLength = lexemLength;

	this->value = 0;
}

void Element::setValue(Value* value) {
	this->value = value;
}

Value* Element::getValue() const {
	return this->value;
}

char* Element::getLexem() const {
	return this->lexem;
}

char* Element::getKey() const {
	return this->getLexem();
}

int Element::getTokenTyp() const {
	return this->tokenTyp;
}

int Element::getLexemLength() const {
	return this->lexemLength;
}

int Element::getHashcode() const {
	return this->hashcode;
}

ostream& operator<<(ostream& ostream, Element& element)
{
	return ostream << element.getKey();
}
